---
title: Create legal case file and assign document sequence
summary: Stamp a file-create date on a legal case and pull the next print-document sequence number for generated correspondence.
status: draft
owner: SAIF Case Management team
last_reviewed: 2026-08-21
library: SAIF.Business.Claim.Legal
reference_type: embedded
operation_id: OP-CLL-012
trigger: A new legal file is created for a case (typically as part of print/letter generation)
---

# Create legal case file and assign document sequence

Stamp a file-create date on a legal case and pull the next print-document sequence number for generated correspondence.

| Field | Value |
|---|---|
| **Operation ID** | OP-CLL-012 |
| **Trigger** | A new legal file is created for a case (typically as part of print/letter generation) |
| **Inputs** | Business-object criteria properties set by the caller (see linked SQL parameter tables) |
| **Outputs** | Persisted/retrieved `clsCreateFile` state |
| **Primary components** | `clsCreateFile` |
| **Entry point** | `SAIF.Business.Claim.Legal\LegalNet\clsCreateFile.vb` |

## Steps

1. Execute the underlying data access for `clsCreateFile` against: [DB-CLL-052](../sql/SQL-052-createfile.md), [DB-CLL-053](../sql/SQL-053-createfile.md)
   - Tables affected: [LEGAL_CASE](../database-tables.md#legal_case)
2. Return the resulting object graph (or success/failure status) to the caller.

## Process flow

```mermaid
flowchart TD
	Start([A new legal file is created for a case, typically during print/letter generation]) --> Validate[Validate business rules]
	Validate --> Decision{Valid?}
	Decision -->|No| EndErr([Return validation errors])
	Decision -->|Yes| Exec[Execute data access for clsCreateFile]
	Exec --> EndOk([Return result])
```

## Failure and edge-case behavior

- Validation failure: the operation returns collected errors without persisting any change.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)
- [SQL catalog](../sql/index.md)
- [Database tables](../database-tables.md)

## Sources
- `SAIF.Business.Claim.Legal\` (clsCreateFile)